package com.zoweunion.mechanic.dao.base;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Mapper
@Component
public interface PartsDao {

	
	/**
	 * 插入配件
	 */
	void insert(Map<String, Object> reqMap);

	/**
	 * 根据dictionaries_code查询count
	 */
	int countByDictionaries_code(Map<String, Object> reqMap);

	/**
	 * 更新配件 包含删除
	 * @param reqMap
	 */
	void update(Map<String, Object> reqMap);
	
	/**
	 * 查询总数
	 */
	int countBycondition(Map<String, Object> reqMap);
	
	
	/**
	 * 分页+条件查询
	 */
	List<Map<String,Object>>pageQuery(Map<String, Object> reqMap);
	
	
	
	/**
	 * 根据保养表id 查询所有关联的配件数据
	 */
	List<Map<String, Object>> getPartsByUpkeep_id(Map<String, Object> reqMap);


	List<Map<String, Object>> getDictionariesNameList(Map<String, Object> reqMap);

	List<Map<String, Object>> getDictionariesTypeList(Map<String, Object> reqMap);

	List<Map<String, Object>> getDictionariesFormatList(Map<String, Object> reqMap);

	List<String> getParameterList(Map<String, Object> reqMap);
}
